#用while计算0-100和
sum = 0
n = 100
while n >=0:
    sum = sum + n
    n = n-1
    print(sum)
    print(n)
print(sum)

#遍历list
L = ['王楠','王曼','王岳岳']
n = 0
while n < len(L):
    print('hello,',L[n])
    n = n + 1

#break 语句

L = ['王楠','王曼','王岳岳']
n = 0
while n < len(L):
    if n >1:
        print('跳出循环')
        break
    print('hello,',L[n])
    n = n + 1

#continue 跳出此次循环继续执行下一次循环
L = ['王楠','王曼','王岳岳']
n = 0
while n < len(L):
    if n % 2 == 0:
        print('跳出循环')
        n = n + 1
        continue
    else:
        print('hello,',L[n])
        n = n + 1
